package object4.package9;

public class Student {
    private int id;

    private String name;

    private double score;

    public Student(int id, String name, double score) {
        this.id = id;
        this.name = name;
        this.score = score;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public double getScore() {
        return score;
    }

    public void setScore(double score) {
        this.score = score;
    }

//    public boolean equals(Object o){
//        if(o == null){
//            //this肯定不会指向null
//            return false;
//        }
//        if(this == o){
//            return true;
//        }
//        if(!(o instanceof Student)){
//            //传入的参数类型不匹配
//            return false;
//        }
//        Student other = (Student) o;
//        return this.id == other.id;
//        //比较两个学生的id
//    }
}
